1. Field of the Invention
The present invention is related generally to a data processing system and in particular to a method and apparatus for data storage. More particularly, the present invention is directed to a computer implemented method, apparatus, and computer usable program code for reconstructing redundant array of independent drive (RAID) arrays on single storage systems.
2. Description of the Related Art
A storage subsystem is comprised of one or more storage controllers and one or more disk drives. The storage system controllers provide access to attached disk drives and support features, such as caching, copy services, and various levels of reliability.
Redundant array of independent drives (RAID), also referred to as redundant array of independent disks, is a type of data storage system that divides and/or duplicates data among multiple hard drives. In a RAID array, data is stored across multiple disk drives. In addition to user data parity, information is stored on portions of one or more disk drives across the RAID array.
Various RAID levels are used to provide reliability in a wide range of storage systems. For example, in a level one RAID, a single hard drive is used for primary data storage and a second hard drive is used for mirroring and/or copying the data on the first hard drive. In a level five RAID array (RAID5), block-level striping is used with parity data being distributed across all disks of the array. When a disk failure is detected, data blocks stored on the failed disk can be “recovered” by using the corresponding parity block and data blocks in the same stripe. Depending on the RAID level, one or more disk failures can be tolerated without any loss of data.
Furthermore, some storage systems support hot spare disks which can replace failing disk drives. When spare disks are used in a storage subsystem, the hot spare disks are not utilized with respect to capacity and head bandwidth, until a disk drive failure occurs. If the storage system supports hot sparing and a hot spare disk drive is available, the hot spare disk becomes part of the array when any array disk in the RAID array fails. When the RAID disk failure occurs, data from the failed disk drive is reconstructed and stored onto the hot spare disk.
The more spare disks are available, the more disk failures can be tolerated by the storage subsystem, assuming that another failure does not occur while the spare disk is being constructed and added to the RAID array. However, as more hot spare disks are provided to the storage subsystem, less user data can be stored because the hot spare disks are not used until a disk drive failure occurs. Hot spare disks also result in increased costs and decreased efficiency in utilization of available disks.